package com.xxy.mybatispluspro.utils;

import lombok.Data;

@Data
public class JsonData {
    int code;
    Object data;
    String msg;
    public JsonData(int code,Object data,String msg){
        this.code=code;
        this.data=data;
        this.msg=msg;
    }
    public static JsonData buildSuccess(Object data){
        return new JsonData(0,data,"success");
    }
    public static JsonData buildError(Object data){
        return new JsonData(-1,data,"failed");
    }
}
